﻿module FSEvent
(* this module concentrates definitions of CLI events (and their arguments), which are triggered from the FS code *)

(* Event args of the commandGraphUpdated event. c is the relevant command and g is the updated graph attached to 
   the command *)
type CommandGraphUpdatedEventArgs(c : CoreEx.Cmd, g : CG.graph) = 
    inherit System.EventArgs()
    member x.Command = c
    member x.Graph = g

(* Event args of the debugInfoAdded event. 'text' is the debug information that was added. *)
type DebugInfoAddedEventArgs(text : string) = 
    inherit System.EventArgs()
    member x.Text = text

(* This event is triggered when a command graph of some command was updated. *)
let commandGraphUpdated = new Event<CommandGraphUpdatedEventArgs>()

(* This event is triggered when ever  debug information is added. *)
let debugInfoAdded = new Event<DebugInfoAddedEventArgs>()
